﻿/**
 * Created by Administrator
 */
// var apiUrl = "http://bxh0736.vicp.cc:28499/njwebsite/home";
// var apiUrl = "http://bxh0736.vicp.cc:28499/webrptapp/Home";
var apiUrl = "http://bxh0736.vicp.cc:28499/webrptapp/Home";
var apiUrl2 = "http://bxh0736.vicp.cc:28499/webrptapp/Excel";
var user={
    account:'FSH20180514',
    key:'kingdee',
    // typecode:'hc'
};
var pageInfo = {
    pagecount:10
}

var ARegexp = {
    mobile:/^((13[0-9])|(14[5,7,9])|(15[^4])|(18[0-9])|(17[0,1,3,5,6,7,8]))\d{8}$/,
    email:/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/
};

function getQueryString(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) return unescape(r[2]);
    return null;
};

function setCookie(cookiename, cookievalue, hours) {
    var date = new Date();
    date.setTime(date.getTime() + Number(hours) * 3600 * 1000);
    document.cookie = cookiename + "=" + cookievalue + "; path=/;expires = " + date.toGMTString();

}

function getCookie(n){
    var name = n + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i<ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
    }
    return "";
}
